<?php

namespace app\admin\controller;

use app\Request as R;
use app\admin\Validate;
use app\admin\model\AdminUser as Model;
use app\admin\model\AdminRole;
use app\Exception;
use services\adminUser\AdminUserManger;
use services\adminUser\RoleManger;
use services\user\UserManger;

class User extends BaseController{


    function index(R $req)
    {
        $page = $req->param('page/i');
        $page = $page<1?1:$page;
        // $datalist = Model::order(Model::PK,'desc')->paginate(config('app.admin_page_size'));
        return view("/user/index",[
            'datalist'=>app(UserManger::class)->query([
                'list_rows'=>config('app.admin_page_size'),
                'page'=>$page
            ])
        ]);
    }

    function updatePassword()
    {
        
    }
}